package org.jwos.plugin.file.web;

import javax.servlet.ServletContext;

import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class ServiceFactory {
	
	public static Object getService(ServletContext sc,String serviceId) {
		Object service = null;
		
		ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(sc);
		service = context.getBean(serviceId);
		
		return service;
	}
	
}
